﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Creative85.Framework.Data;
using Project32CHE.Biz.Unionshop.Models;
using NPoco;
using Creative85.Framework.Utilities;

namespace Project32CHE.Biz.Unionshop
{
    public static class SupplierService
    {
        /// <summary>
        /// 根据名称获取供应商
        /// </summary>
        /// <param name="shopId"></param>
        /// <param name="code"></param>
        /// <returns></returns>
        public static Supplier Get(Guid shopId, string Name)
        {
            return Db.Instance.Query<Supplier>().Where(x => (x.ShopID == shopId && x.SupplierName == Name)).SingleOrDefault();
        }
    }
}
